package com.situ.redis.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

// redis.host=localhost
// redis.port=6379
@ConfigurationProperties(prefix = "redis")
public class MyRedisProperties {
    // 用户不配置，设置一个默认值
    private String host = "localhost";
    private Integer port = 6379;

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }
}
